<?php

header_remove("X-Powered-By");

call_user_func(
	function($dir) {
		ini_set("open_basedir", $dir);
		set_include_path($dir);
	},
	dirname(__DIR__)
);

if (extension_loaded("libxml")) {
	libxml_disable_entity_loader();
}

/** Absolute path to the WordPress directory. */
if (!defined("ABSPATH")) {
	define("ABSPATH", __DIR__ . "/");
}

define("APPLICATION_ENV", call_user_func(
	function() {
		$environment = getenv("APPLICATION_ENV");

		if (in_array($environment, [
			"development",
			"testing",
			"staging",
			"production",
		])) {
			return $environment;
		}

		return "production";
	}
));

if ((include ABSPATH . "../config/huisvanherstel-" . APPLICATION_ENV . ".php") === false) {
     include ABSPATH . "../config/huisvanherstel.php";
}
/* vi:set ts=4 sw=4 noet: */
